<form class="layui-form">
    <input type="hidden" name="bean.id" value="#(bean.id)">
    <input type="hidden" name="bean.parentId" value="#(bean.parentId)">
	<div class="main-container">
		<div class="layui-form-item">
		    <div class="layui-inline">
				<label class="layui-form-label required">名称</label>
				<div class="layui-input-inline">
					<input type="text" name="bean.name" value="#(bean.name)" lay-verify="required" autocomplete="off" placeholder="请输入名称" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
		        <label class="layui-form-label required">状态</label>
		        <div class="layui-input-inline">
		            <input type="radio" name="bean.status" value="on" title="启用" #if(bean.status == 'on' || bean.status == null) checked #end>
		            <input type="radio" name="bean.status" value="off" title="禁用" #if(bean.status == 'off') checked #end>
		        </div>
			</div>
		</div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label required">代码&nbsp;/&nbsp;键</label>
                <div class="layui-input-inline">
                    <input type="text" name="bean.key" value="#(bean.key)" lay-verify="required" autocomplete="off" placeholder="" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label required">排序</label>
                <div class="layui-input-inline">
                    <input type="text" name="bean.sortNum" lay-verify="required|number" autocomplete="off" class="layui-input" value="#(bean.sortNum)">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">值</label>
            <div class="layui-input-block">
                <textarea placeholder="" name="bean.value" lay-verify="required" class="layui-textarea">#(bean.value)</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">参数</label>
            <div class="layui-input-block">
                <textarea placeholder="" name="bean.para" lay-verify="" class="layui-textarea">#(bean.para)</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-block">
                <textarea placeholder="" name="bean.remark" lay-verify="" class="layui-textarea">#(bean.remark)</textarea>
            </div>
        </div>
	</div>
    <div class="layui-form-item" style="display: none;">
        <div class="layui-input-block">
			<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="data-save" id="data-save">
				<i class="layui-icon layui-icon-ok"></i> 提交
			</button>
		</div>
	</div>
</form>
#include("/admin/_common/foot.html")
<script type="text/javascript">
layui.use(['jquery', 'form', 'common'], function() {
    var $ = layui.jquery;
    var form = layui.form;
    var common = layui.common;
    
    // 监听上级下拉事件
    form.on('select(select-superior)', function(data) {
    	alert($(data.elem).attr("level"));
    });
});
</script>
